﻿using System;
using System.Collections.Generic;
using System.Text;
using Castle.ActiveRecord;
using System.Collections;
using Castle.ActiveRecord.Queries;

namespace Mang24k99.Model.COMM
{
    [ActiveRecord("KT_COMM_BASEINFO_History")]
    public class MKtCommBaseinfoHistory : ActiveRecordBase
    {
        #region Model

        private int _id;
        private string _factor_code;
        private string _factor_name;
        private string _factor_value;
        private string _comments;
        private int? _is_validate;
        private DateTime? _input_time;
        private DateTime? _modify_time;
        private DateTime? _delete_time;

        /// <summary>
        /// 主键ID
        /// </summary>
        [PrimaryKey(PrimaryKeyType.Native, "ID")]
        public int ID
        {
            set { _id = value; }
            get { return _id; }
        }

        /// <summary>
        /// 参数编码
        /// </summary>
        [Property("FACTOR_CODE")]
        public string FACTOR_CODE
        {
            set { _factor_code = value; }
            get { return _factor_code; }
        }

        /// <summary>
        /// 参数名称
        /// </summary>
        [Property("FACTOR_NAME")]
        public string FACTOR_NAME
        {
            set { _factor_name = value; }
            get { return _factor_name; }
        }

        /// <summary>
        /// 参数值
        /// </summary>
        [Property("FACTOR_VALUE")]
        public string FACTOR_VALUE
        {
            set { _factor_value = value; }
            get { return _factor_value; }
        }

        /// <summary>
        /// 备注
        /// </summary>
        [Property("COMMENTS")]
        public string COMMENTS
        {
            set { _comments = value; }
            get { return _comments; }
        }

        /// <summary>
        /// 是否有效：0——使用，1——禁用
        /// </summary>
        [Property("IS_VALIDATE")]
        public int? IS_VALIDATE
        {
            set { _is_validate = value; }
            get { return _is_validate; }
        }

        /// <summary>
        /// 输入时间
        /// </summary>
        [Property("INPUT_TIME")]
        public DateTime? INPUT_TIME
        {
            set { _input_time = value; }
            get { return _input_time; }
        }

        /// <summary>
        /// 修改时间
        /// </summary>
        [Property("MODIFY_TIME")]
        public DateTime? MODIFY_TIME
        {
            set { _modify_time = value; }
            get { return _modify_time; }
        }

        /// <summary>
        /// 删除时间
        /// </summary>
        [Property("DELETE_TIME")]
        public DateTime? DELETE_TIME
        {
            set { _delete_time = value; }
            get { return _delete_time; }
        }

        #endregion Model
        #region Static Methods
        public static IList<MKtCommBaseinfoHistory> SelectAll()
        {
            return (IList<MKtCommBaseinfoHistory>)FindAll(typeof(MKtCommBaseinfoHistory));
        }
        public static MKtCommBaseinfoHistory SelectByPrimaryKey(object ID)
        {
            return (MKtCommBaseinfoHistory)FindByPrimaryKey(typeof(MKtCommBaseinfoHistory), ID);
        }
        public static IList<MKtCommBaseinfoHistory> SelectALLByProperty(string property, object value)
        {
            return (IList<MKtCommBaseinfoHistory>)FindAllByProperty(typeof(MKtCommBaseinfoHistory), property, value);
        }
        public static IList<MKtCommBaseinfoHistory> SelectALLSliced(int firstResult, int maxResult, NHibernate.Expression.DetachedCriteria criteria)
        {

            return (IList<MKtCommBaseinfoHistory>)SlicedFindAll(typeof(MKtCommBaseinfoHistory), firstResult, maxResult, criteria);
        }

        #endregion Static Methods
    }
}
